// 创建整个应用的路由
import VueRouter from "vue-router"

import index from "../components/layout/index"
import studentManage from "../components/studentManage/index"
import majorManage from "../components/majorManage/index"
import clazzManage from "../components/clazzManage/index"
import staffManage from "../components/staffManage/index"
import leave from "../components/leave/leave"
import login from "../components/login"
import notice from "../components/notices/notice"
import leaveRule from "../components/leaveRule/leaveRule"

export default new VueRouter({
    routes: [
        {
            path: "/index",
            component: index,
            name: "index",
            children: [
                {
                    name: "studentAccount",
                    path: "/index/studentAccount",
                    component: studentManage
                },  {
                    name: "leave",
                    path: "/index/leave",
                    component: leave
                }, {
                    name: "notice",
                    path: "/notice/getNoticeList",
                    component: notice
                }, {
                    name: "leaveRule",
                    path: "/leaveRule/leaveRule",
                    component: leaveRule
                }, {
                    name: "staffManage",
                    path: "/index/staffManage",
                    component: staffManage
                }, {
                    name: "majorManage",
                    path: "/index/majorManage",
                    component: majorManage
                }, {
                    name: "clazzManage",
                    path: "/index/clazzManage",
                    component: clazzManage
                }
            ]
        },
        {
            name: "login",
            path: "/",
            component: login

        }
    ]
})

